1. Technical Field
The present invention is directed to a method and apparatus for managing data storage systems. More specifically, the present invention is directed to a method and apparatus for exporting file systems without first mounting them.
2. Description of Related Art
Network file system (NFS) is a client-server application that allows network users to access shared files stored on computer systems of different types. Users can manipulate shared files as if they were stored locally (i.e., on the users' own hard disk). With NFS, computer systems connected to a network operate as clients when accessing remote files and as servers when providing remote users access to local shared files. The NFS standards are publicly available and widely used.
NFS uses a hierarchical file system, with directories as all but the bottom level of files. Each entry in a directory (file, directory, device, etc.) has a string name. Different operating systems (OSs) may have restrictions on the depth of the names used, as well as using different syntax to represent a pathname. A pathname is a concatenation of all the components (directory and file names) in the name. A file system is a tree on a single server (usually a single disk or physical partition) with a specified root directory.
Some OSs provide a “mount” operation that makes all file systems appear as a single tree, while others maintain a multiplicity of file systems. To mount a file system is to make the file system available for use at a specified location, the mount point. To use an analogy, suppose there is a tree that contains a plurality of branches, as most trees do, but the branches are not attached to the tree. Upon startup, some OSs attach each branch of the tree at its proper location (the mount point) on the tree. Other OSs, however, do not attach the branches to the tree on startup but instead leave them in their storage place. Each branch, in this case, is referred to as a file system.
Most computer systems, especially those running Microsoft OSs, generally attach all the branches to the tree on startup. However, Unix-based computer systems typically do not do so. They only attach certain branches to the tree on startup. These attached branches (or file systems or directories) are the ones that contain files that are critical for the OS to function properly. The other file systems (branches) are mounted (attached to the tree) only when needed.
One particular time a file system is mounted is just before the file system is exported. To export a file system is to make the file system available for NFS clients to mount (i.e., to attach the branch to their own tree). When exporting a file system, the mount point as well as the name of the storage device containing the file system must be provided (i.e., the location on the tree where the branch is to be attached as well as the location where the branch is stored must be provided). If the file system is mounted, all the needed information is known; hence, the reason why file systems are mounted before they are exported.
As mentioned before, most Unix-based servers mount some file systems only when they are needed. But, if a mounted non-critical OS file system has not been used within a pre-defined amount of time, it will be unmounted. This allows for other file systems to be mounted if needed. As will be explained later, mounting file systems can be a relatively time-consuming and CPU-intensive endeavor. Thus, mounting file systems only for export purposes may be a great waste of time and energy, especially if the file systems are subsequently dismounted without ever having been used.
Thus, what is needed is an apparatus and method of mounting file systems when they are to be used rather than when they are to be exported.